package thread.bank;

public class Transaction {
	public static final int DEBIT = 0;
	public static final int CREDIT = 1;
	public static String[] types = { "Debit", "Credit" };

	private Account account;
	private int amount;
	private int transactionType;

	public Transaction(Account account, int transactionType, int amount) {
		this.account = account;
		this.transactionType = transactionType;
		this.amount = amount;
	}

	public Account getAccount() {
		return this.account;
	}

	public int getTransactionType() {
		return this.transactionType;
	}

	public int getAmount() {
		return amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	public String toString() {
		return types[transactionType] + "A//C: " + ": $" + amount;
	}
}
